package com.ctshk.sapp.order.tour.controller;

import com.ctshk.common.annotations.OperationLogAnnotation;
import com.ctshk.common.dto.Result;
import com.ctshk.common.enums.OperationLogModel;
import com.ctshk.common.enums.OperationLogType;
import com.ctshk.common.web.support.BaseController;
import com.ctshk.rpc.order.tour.req.SeriesOrderTouristOtherFeeAddReq;
import com.ctshk.rpc.order.tour.service.ISeriesOrderTouristOtherFeeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 系列团游客其他费用 前端控制器
 * </p>
 *
 * @author 谭响
 * @since 2021-01-22
 */
@Api(value="其他费用", tags="其他费用")
@RestController
@RequestMapping("/series/order/tourist/other/fee")
public class SeriesOrderTouristOtherFeeController extends BaseController {

    @DubboReference
    private ISeriesOrderTouristOtherFeeService iSeriesOrderTouristOtherFeeService;

    @ApiOperation(value = "添加", notes = "添加")
    @OperationLogAnnotation(operModul = OperationLogModel.ORDER, operType = OperationLogType.ADD, operTitle = "添加", operDesc = "添加")
    @PostMapping("/add")
    public Result add(@RequestBody SeriesOrderTouristOtherFeeAddReq req) {
        req.setUserId(getCurrentUser(getRequest()).getId());
        return iSeriesOrderTouristOtherFeeService.add(req);
    }

}
